package work.parabola.assets.common;

/**
 * 
 * @author 黄松祥
 * 2018年4月8日 上午8:31:25
 */
public class NewsLawsConst {
	
	public static final String ATTACHMENT_TITLE_SEPARATOR = ":;";
	
	public static final String ATTACHMENT_FILE_SEPARATOR = ",";
	
	public static final int RECENT = 2;//表示新闻公告和法律法规发布的时间与当前日期相差RECENT天以内
	
	public interface Type{
		public static final int NEWS = 0;
		public static final int LAWS = 1;
	}
	
	public enum Status{
		POSTED(0, "已发布"),
		DRAFT(1, "草稿");
		private int code;
		private String value;
		
		Status(int code, String value){
			this.code = code;
			this.value = value;
		}

		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		
		public static Status codeOf(int code){
            for(Status status : values()){
                if(status.getCode() == code){
                    return status;
                }
            }
            return null;
        }
	}

}
